<!doctype html>
<html lang="zh-CH">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	{{--<meta name="viewport" content="width=device-width, initial-scale=1">--}}
	<title>木投网--现货资源</title>
	<link rel="stylesheet" href="/resource/css/mt_index.css">
	<link rel="stylesheet" href="/resource/css/mt_showBo.css">
	<link rel="stylesheet" href="/resource/css/mt_now.css">
</head>
<body>
@include('common.shop_head')
<!-- 现货资源 -->
<div class="now-resource main">
	<div class="now-left left">
		<div class="title">当前位置：
			<a href="/">首页</a>&#62<a href="/new_resource">现货资源</a>
		</div>
		<div class="form-inline">
			<form action="/new_resource" method="post">
				<div class="form-group">
					<label for="">品名：</label>
					<input type="text" class="form-control" name="key_word" placeholder="" @if($key_word)value="{{$key_word}}@endif">
				</div>
				<div class="form-group">
					<label for="">地区：</label>
					<input type="text" class="form-control"  name="storage" placeholder="">
				</div>
				<button type="submit" class="btn-login">搜索</button>
			</form>
		</div>
		<div class="table">
			<table>
				<thead>
					<tr>
						<th width="110px">商品标题</th>
						<th width="110px">规格</th>
						<th width="140px">库存量</th>
						<th width="130px">起订量</th>
						<th width="140px">价格</th>
						<th width="110px">仓储地</th>
						<th width="110px">发布时间</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
				@foreach($info as $v)
					<tr>
						<td><div>{{$v->product_name}}</div></td>
						<td><div>{{$v->spec}}</div></td>
						<td><div>{{$v->stock}}{{$v->unit}}</div></td>
						<td><div>{{$v->start_num}}{{$v->unit}}</div></td>
						<td><div><span>￥{{$v->price}}/{{$v->unit}}</span></div></td>
						<td><div>{{$v->storage}}</div></td>
						<td><div>{{date('Y-m-d',$v->created)}}</div></td>
						<td><div><a href="/new_resource_details?product_id={{$v->product_id}}">查看</a></div></td>
					</tr>
					@endforeach
				</tbody>
			</table>
		</div>
		    {{$info->appends(['key_word' => $key_word,'storage'=>$storage])->links()}}
	</div>
	<div class="now-right left">
		<div class="act-wrap-right">
			<div class="act-t">免费找货助手</div>
			@include('common.shop_release')
		</div>

		<div class="classify-right">
			<div class="til">推广商品</div>
			<div class="emphases-box">
				@foreach($ad_product as $v)
				<div class="floor-shop">
					<div class="shop-img">
						<a href="/shopping_details/?product_id={{$v->product_id}}"><img src="{{$v->product_img}}" alt=""></a>
					</div>
					<div class="shop-info">
						<a href="/shopping_details/?product_id={{$v->product_id}}" class="name"><span>{{$v->product_name}}</span></a>
						<div class="price">￥{{$v->price}}/{{$v->unit}}</div>
					</div>
				</div>
					@endforeach
			</div>
		</div>
	</div>
</div>
@include('common.shop_foot')

<script src="/resource/js/jquery-1.11.3.min.js"></script>
<script src="/resource/js/mt_index.js"></script>
<script src="/resource/js/mt_showBo.js"></script>  <!-- 提示信息 -->
<script>
	//导航 商品全部 隐藏显示
	var $allW = $('.all-wrap');
	$allW.hide();
	$('.nav .nav-all').attr('rel','hide');
	$('.nav .nav-all').click(function(){
		if($(this).attr('rel') == 'hide'){
			$(this).attr('rel','show');
			$allW.show();
		}else{
			$(this).attr('rel','hide');
			$allW.hide();
		};		
	});
</script>
</body>
</html>